//取消加入帮派申请
// @ts-ignore
export async function execute(client_id,message_json) {
    let characters = G.Characters.get_current_login_characters(client_id);
    let gang_id = message_json["编号"];
    if (_GangDataCache.has(characters["BPID"])) {
        ClientUtils.send_basic_prompt(client_id, "你已经有一个帮派了");
        return;
    }
    let gang_data = _GangDataCache.get(gang_id);
    if(gang_data === undefined){
        ClientUtils.send_basic_prompt(client_id, "申请的帮派不存在或已解散");
        return;
    }
    for (let index = 0; index < gang_data["申请人员"].length; index++) {
        const member = gang_data["申请人员"][index];
        if(member["id"] === characters["id"]){
            gang_data["申请人员"].splice(index, 1)
            ClientUtils.send_basic_prompt(client_id, "取消成功。");
			return;
        }
    }
    ClientUtils.send_basic_prompt(client_id, "你还没有提交申请。");
}